<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
           var c = 0;
        for (var a =0;a<10;a++){

            if(a<5){
             //  var c =0;
             c++;
             console.log(a);
             break;

            }





        }



           console.log(c);






    </script>
</head>
<body>

</body>
</html>